/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package progin;

import java.util.Date;

/**
 *
 * @author Jiwandono
 */
public class chatRoom {
    public enum parentType {
        fakultas,
        prodi
    }

    public enum roomType {
        temp,
        persist
    }

    public int parent;
    public parentType parenttype;
    public String name;
    public String owner;
    public Date timestamp;
    public roomType roomtype;

    public chatRoom(int _parent, parentType _parenttype, String _name, String _owner) {
        parent = _parent;
        parenttype = _parenttype;
        name = _name;
        owner = _owner;
        timestamp = new Date();
        roomtype = roomType.temp;
    }

    public void changeOwnership(String username) {
        owner = username;
    }

    public void changeType(roomType type) {
        roomtype = type;
    }
}
